package com.insigma.business.qrcode.soldier.dto;


import com.insigma.business.qrcode.common.vo.DescEnum;

import java.util.LinkedHashMap;
import java.util.Map;


public enum ThroughTrainProcessEnum implements DescEnum {


    
    DEALING("处理中"),

    
    REJECT("驳回"),

    
    SUCCESS("成功"),

    
    MODIFICATION("退回修改");


    
    private String desc;

    ThroughTrainProcessEnum(String desc) {
        this.desc = desc;
    }

    
    public static ThroughTrainProcessEnum getByEnumName(final String enumName) {
        for (ThroughTrainProcessEnum element : values()) {
            if (element.name().equals(enumName)) {
                return element;
            }
        }
        return null;
    }

    
    public static Map<String, String> getName2TitleMap() {

        final Map<String, String> name2TitleMap = new LinkedHashMap<>();

        for (ThroughTrainProcessEnum element : values()) {
            name2TitleMap.put(element.name(), element.desc);
        }

        return name2TitleMap;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }
}
